union value
{
    BOOL b_val;
    int i_val;
    float f_val;
};

struct data
{
    long key;
    char name[32];
    int addr;
    int type;
    union value val;
};

//共享内存路径
/tmp/ipc/msgqueue -p
//消息队列路径
mkdir /tmp/ipc/msgqueue -p

每次开机需要重新创建